Conversation
| const hasMax = maxFeePerGas !== undefined; | ||
| const hasPriority = maxPriorityFeePerGas !== undefined; | ||
| if (hasMax && !hasPriority) { | ||
| throw new ApiResponseError('eip1559 missing maxPriorityFeePerGas', 400); |
Contributor
There was a problem hiding this comment.
Have you confirmed whether both fields are required to be passed here?
Contributor
Author
There was a problem hiding this comment.
Yes. The server-side auto-estimation only triggers when both fields are missing. If only one field is provided, the server won't auto-estimate, it will fail downstream. Better to reject early with a clear error.
alextse-bg
reviewed
Feb 19, 2026
| * | ||
| * Note: Partial objects (only one field) pass validation but backend handles them | ||
| */ | ||
| export const EIP1559Params = t.type({ |
Contributor
There was a problem hiding this comment.
nit:
export const EIP1559Params = t.union([
t.type({}),
t.type({
/** Maximum priority fee per gas (in wei) - REQUIRED */
maxPriorityFeePerGas: t.union([t.number, t.string]),
/** Maximum fee per gas (in wei) - REQUIRED */
maxFeePerGas: t.union([t.number, t.string]),
})
]);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eip1559: {}maxFeePerGas/maxPriorityFeePerGas)
/sendcoinsand/sendmanyendpointsChanges
EIP1559Paramsschema to uset.partialfor flexible input validationeip1559 missing maxPriorityFeePerGaseip1559 missing maxFeePerGasTICKET: WP-7882